package com.skyline.common.util;

/**
 * 行政地点的Util
 * 
 * @author Jairus Chan
 * @version 0.1
 */
public class SiteUtils {
	public static String getCityID(String siteid) {
		return (String) siteid.subSequence(0, 7);
	}

	public static boolean inSameCity(String siteid, String siteidCompared) {
		if (siteid == null || siteidCompared == null)
			return true;
		String cityid = getCityID(siteid);
		// System.out.println(cityid);
		String cityidCompared = getCityID(siteidCompared);
		// System.out.println(cityidCompared);
		if (cityid.equals(cityidCompared)) {
			return true;
		} else {
			return false;
		}
	}

	// public static void main(String args[]){
	// System.out.println(inSameCity("001322003","001321003"));
	// }
}
